<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sys="">
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>登入 - KISS</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
  <link rel="stylesheet" th:href="@{/css/admin.css}" media="all">
  <link rel="stylesheet" th:href="@{/css/login.css}" media="all">
</head>
<body>
   
  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">

    <div class="layadmin-user-login-main">
      <div class="layadmin-user-login-box layadmin-user-login-header">
        <h2>Kiss</h2>
      </div>
      <form class="layadmin-user-login-box layadmin-user-login-body  layui-form" lay-filter="login-submit">
        <div class="layui-form-item">
          <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
          <input type="text"  name="loginname" id="login-username" lay-verify="required" placeholder="用户名" class="layui-input">
        </div>
        
        <div class="layui-form-item">
          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
          <input type="password" name="password" id="login-password" lay-verify="required" placeholder="密码" class="layui-input">
        </div>




        <div class="layui-form-item">
          <a href="#" th:onclick="alert(1)" style="float: right;">注册</a>&nbsp;|<a href="#" th:onclick="alert(1)" style="float: right;">邮箱登录</a>
        </div>
        
        <div class="layui-form-item">
          <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="login-submit">登 入</button>
        </div>
      </form>




    
  </div>

<script type="text/javascript" th:src="@{/js/jquery-3.0.0.min.js}"></script>
<script type="text/javascript" th:src="@{/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/js/main.js}"></script>
<script type="text/javascript" th:src="@{/js/basic.js}"></script>
<script type="text/javascript" th:inline="javascript">
var web_root = [[${web_root}]];
layui.use(['form'], function(){
    var $ = layui.$;
    var form = layui.form;
    form.render();
    //提交
    form.on('submit(login-submit)', function(obj){
    	console.log(obj)
    	$.OGet(web_root+"/page/login",obj.field,function(data){
      		if (data.code == "200") {
      			window.location.replace(web_root+"/page/index.html");
      		}else{
      			layer.msg(data.message);
      		}
    	});
    	return false;
      
    });
});   
</script>
</body>
</html>